<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="<?php echo site_url("style.css"); ?>" type="text/css" />
<title>Manage Series Media</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body>
	<!-- header starts here -->
<div id="header">
  <div id="header-content"> 
    <ul>
      <li><a href="<?php echo site_url("admin/logout/"); ?>">Logout</a></li>
    </ul>
  </div>
</div>

<div id="content-wrap">
	
	<div id="nav">
		<img src="<?php echo site_url("images/Nav_Head.png"); ?>" alt="navigation header" class="no-border" />
		<a href="<?php echo site_url("review"); ?>"><img src="<?php echo site_url("images/Home_On.png"); ?>" alt="home" class="no-border" /></a>
		<a href="<?php echo site_url("review/reviews/default/0/A"); ?>"><img src="<?php echo site_url("images/Reviews_Off.png"); ?>" alt="reviews" class="no-border" /></a>
		<br />
		<div class="navlink"><a href="<?php echo site_url("admin/post/"); ?>">Add Post</a></div><br />
		<div class="navlink"><a href="<?php echo site_url("admin/add_series/"); ?>">Add Series</a></div><br />
		<div class="navlink"><a href="<?php echo site_url("admin/edit/post/0"); ?>">Edit Post/Review</a></div><br />
		<div class="navlink"><a href="<?php echo site_url("admin/edit/series/0"); ?>">Edit Series</a></div><br />
        <div class="navlink"><a href="<?php echo site_url("admin/manage_list/0"); ?>">Media Management</a></div><br />
		<div class="navlink"><a href="<?php echo site_url("admin/edit_schedule/"); ?>">Edit Schedule</a></div><br />
	</div>
		
	<div id="adminwrapper">
		<table width="100%">
<?php
	// Echo current files
	echo"<tr><td>Files in $updir</td></tr>";
	$cnt = 0;
	foreach($list as $row){
		if($cnt > 1){
			echo"<tr><td>$row</td></tr>";
		}
		$cnt++;
	}
	echo'</table><br />';
	// Upload Form
	if(isset($error)){
		echo $error;
	}
	$hidden = array('series' => $series, 'ep' => $ep, 'pid' => $pid);
	echo form_open_multipart('admin/do_upload/','',$hidden);
    echo'
    <input type="file" name="userfile" size="30" />
    
    <br /><br />
    
    <input type="submit" value="upload" />
    
    </form>';
	// Thumbnail process
	echo'<br /><br /><a href="'.site_url("admin/make_thumbs/$series/$ep/$pid").'">Make Thumbnails</a><br /><br />';
	// Insert image blocks into post
	echo'<a href="'.site_url("admin/insert_images/$series/$ep/$pid").'">Insert images into review</a><br />';
?>
		
		
	</div>
</div>

</body>
</html>
